import {
  CommandDialogPlacement,
  CSCircle,
  CSLine,
  css2dInputLable,
  ObjInfo,
} from '@amcax/base';
import { Vector3Tuple } from 'three-legacy';

export type DirectionDataType = {
  directionVisible: boolean;
  directionVec?: Vector3Tuple;
  length?: number;
  directionText?: string;
};
export interface TopoDialogProps {
  title: string;
  placement?: CommandDialogPlacement;
  props?: ObjInfo;
  onClose: () => void;
}
export enum pointType {
  SpatialPoint, //空间点
  HardPoint, //硬点(面上的边的端点)
  WeldingPoint, //焊点
}

export enum DirectionType {
  SelectPlane,
  SelectLine,
  SelectTwoPoint,
  NormalVec,
}
export enum GenerateMode {
  Rotate = 'rotate',
  Sweep = 'sweep',
  Extrude = 'extrude',
  Coons = 'coons',
  Fit = 'fit',
  Segment = 'segment',
  Curve = 'curve',
  Circle = 'circle',
}
export enum ModifyMode {
  AlongFace = 'alongFace',
}
export enum MergeMode {
  TwoEdges = 'TwoEdges',
  AutoOnFaces = 'AutoOnFaces',
}
export enum DeleteMode {
  Vertex = 'vertex',
  Edge = 'edge',
  Face = 'face',
  Volume = 'volume',
}
export interface Pick3DOptions {
  all?: boolean;
  model?: boolean;
  face?: boolean;
  line?: boolean;
  point?: boolean;
  pointCloud?: boolean;
  planeOnly?: boolean;
  straitLineOnly?: boolean;
}

export enum ReferencePlaneType {
  XOY = 'XY',
  XOZ = 'XZ',
  YOZ = 'YZ',
}

export enum State {
  NONE,
  DRAW,
  EXTRUDE,
}
export type MouseState = State.NONE | State.DRAW | State.EXTRUDE;

export type TrackingData = {
  circle1: CSCircle;
  circle2: CSCircle;
  rline: CSLine;
  hline?: CSLine;
  hline2?: CSLine;
  rline2?: CSLine;
  rlabel?: css2dInputLable;
};
export enum BasicSurfaceMode {
  Cuboid = 'cuboid',
  Cylinder = 'cylinder',
  Cone = 'cone',
  Sphere = 'sphere',
  Torus = 'torus',
}
// 投影类型
export enum ProjectType {
  PointProject = 'point',
  LineProject = 'line',
}
